package com.cloud.feign.consumer.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.cloud.feign.consumer.entity.User;

@FeignClient("provider")
public interface IHelloService {
	@RequestMapping("/helloController/sayHelloWorld")
	String sayHelloWorld();
	
	@RequestMapping("/helloController/hello1")
	String hello1(@RequestParam("name")String name);
	
	@GetMapping("/helloController/hello2")
	 User hello2(@RequestHeader("name") String name,@RequestHeader("age") Integer age);
	
	@PostMapping("/helloController/hello3")
	public String hello3(User user);
}
